# -*- coding: utf-8 -*-
# @Time    : 2019/11/4 16:32
# @Author  : LiHaowen
# @Email   : lihaowen2017@163.com
# @File    : simple_test.py


def res():
    yield 1
    yield 2

    return 4


if __name__ == '__main__':
    r = res()
    print(r.send(None))
    print(next(r))
    try:
        next(r)
    except StopIteration as e:
        print(e.value)


